package main

import (
	"fmt"
	"sync"
	"time"
)

func main() {
	hello()
	go world()
	for {
	}
}

var mutex sync.Mutex

func print(s string) {
	mutex.Lock()
	for _, c := range s {
		time.Sleep(300 * time.Millisecond)
		fmt.Printf(" %c", c)
	}
	mutex.Unlock()
}

func hello() {
	print("hello")
}
func world() {
	print("world")
}
